package com.example.agenda;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.ListView;

import com.example.agenda.presenter.ContactsPresenter;
import com.example.agenda.view.ContactsView;

public class MainActivity extends Activity implements ContactsView {
	private ContactsPresenter contactsPresenter;

	public MainActivity() {
		contactsPresenter = new ContactsPresenter(this, this);
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.activity_main);

		contactsPresenter.start();
	}

	@Override
	protected void onResume() {
		super.onStart();

		contactsPresenter.start();
	}

	public Button getButtontAdd() {
		return (Button) findViewById(R.id.btAdd);
	}

	public Button getButtontDel() {
		return (Button) findViewById(R.id.btDel);
	}

	public ListView getListView() {
		return (ListView) findViewById(R.id.lstContatos);
	}
}